<script setup lang="ts">
import {
  baseUrl,
  historyMessageLength,
  debugMode,
  gravatarEmail,
  toggleSettingsPanel
} from "@/views/domain/knowledge/config/ollama";
import { ref } from "vue";
const settings = ref({});
const disabled = ref(true);
const saveSettings = () => {};
</script>

<template>
  <div class="basic-body">
    <div class="head-line">
      <el-button
        plain
        :type="disabled ? 'info' : 'primary'"
        :icon="disabled ? 'Edit' : 'Select'"
        @click="disabled = !disabled"
      />
    </div>
    <el-form v-model="settings" label-position="top" :disabled="disabled">
      <el-space fill>
        <el-form-item label="调试模式">
          <el-switch v-model="debugMode" />
          <el-alert type="info" show-icon :closable="false">
            开启调试模式后，将不会对用户输入进行过滤，并且会输出更多的日志信息。对使用没有影响
          </el-alert>
        </el-form-item>
      </el-space>
      <el-form-item label="Ollama Api">
        <el-input v-model="baseUrl" placeholder="Ollama Api" />

        <el-alert type="info" show-icon :closable="false">
          目前只支持Ollama,默认LLMLink会有内置的Ollama服务，您也可以使用自己的Ollama服务
        </el-alert>
      </el-form-item>
    </el-form>
  </div>
</template>
<style lang="scss" scoped>
.basic-body {
  width: 100%;

  .head-line {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
}
</style>
